<?php $this->pageTitle = Yii::app()->user->name; ?>
<div class="c_body">
	<div class="u_tabs">
		<div class="u_tabs_head ajaxLinks">
			<a class="u_tab" id="u_search_tab1" href="<?php echo Yii::app()->createUrl("profile/settingsPersonal",array('id'=>$_GET['id'])); ?>">Личные данные</a>
			<div class="u_tab curr">Общее</div>
			<a class="u_tab" id="u_search_tab3" href="<?php echo Yii::app()->createUrl("profile/settingsPrivacy",array('id'=>$_GET['id'])); ?>">Приватность</a>
			<a class="u_tab" id="u_search_tab4" href="<?php echo Yii::app()->createUrl("profile/settingsAlert",array('id'=>$_GET['id'])); ?>">Оповещения</a>
			<a class="u_tab" id="u_search_tab5" href="<?php echo Yii::app()->createUrl("profile/BlackList",array('id'=>$_GET['id'])); ?>">Черный список</a>
		</div>
	</div>
	<div class="clearfix">	
		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'groups-form',
			'enableAjaxValidation'=>false,
			'htmlOptions'=>array('rel' =>Yii::app()->createUrl('profile/index', array('id'=>Yii::app()->request->getParam('id')))),
		)); ?>

		<?php echo $form->errorSummary($model); ?>
		<div class="u_cat also">
			<div class="u_cat_head_strip"></div>
			<div class="u_cat_head"><span>настройки стены</span></div>
			<div class="checkbox_row">
				<?php $class = ($model->wall_my_records) ? 'checked' : '' ; ?>
				<div class="checkbox_block <?php echo $class; ?>">
					<div></div>
					<input type="checkbox" name="Users[wall_my_records]" value="1" id="checkbox_1" class="checkbox_item" <?php echo $class; ?> />
					<label for="checkbox_1"><?php echo $form->labelEx($model,'wall_my_records'); ?></label>
					<?php echo $form->error($model,'wall_my_records'); ?>
				</div>

				<?php $class = ($model->wall_comments) ? 'checked' : '' ; ?>
				<div class="checkbox_block <?php echo $class; ?>">
					<div></div>
					<input type="checkbox" name="Users[wall_comments]" value="1" id="checkbox_2" class="checkbox_item" <?php echo $class; ?> />
					<label for="checkbox_2"><?php echo $form->labelEx($model,'wall_comments'); ?></label>
					<?php echo $form->error($model,'wall_comments'); ?>
				</div>
			</div>
		</div>

		<table class="flds_form">
			<!-- Изменить пароль -->		
			<tr>
				<td>
					<div class="u_cat also">
						<div class="u_cat_head_strip"></div>
						<div class="u_cat_head"><span>Изменить пароль</span></div>
					</div>
				</td>
			</tr>	
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'oldPassword'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php //echo CHtml::textField('password','',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
							<?php echo $form->textField($model,'oldPassword',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'oldPassword'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'newPassword'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'newPassword',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'newPassword'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'confirmPassword'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'confirmPassword',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'confirmPassword'); ?>
					</div>
				</td>
			</tr>

			<!-- Адрес Вашей электронной почты -->		
			<tr>
				<td>
					<div class="u_cat also">
						<div class="u_cat_head_strip"></div>
						<div class="u_cat_head"><span>Адрес Вашей электронной почты</span></div>
					</div>
				</td>
			</tr>	
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'oldEmail'); ?>
				</td>
				<td class="flds_form_r">
					<div class="">
						<?php echo $model->email; ?>
						<?php //echo $form->error($model,'oldEmail'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'newEmail'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'newEmail',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php // echo $form->error($model,'newEmail'); ?>
					</div>
				</td>
			</tr>
			<!-- Региональные настройки -->		
<!-- 
			<tr>
				<td>
					<div class="u_cat also">
						<div class="u_cat_head_strip"></div>
						<div class="u_cat_head"><span>Региональные настройки</span></div>
					</div>
				</td>
			</tr>	
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'language_profile'); ?>
				</td>
				<td class="flds_form_r">
					<div class="select_block long">						
						<?php echo $form->dropDownList($model,'language_profile',CSelect::items('Languages'),  array('empty' => ('Выберите страну'))); ?>						
						<?php echo $form->error($model,'language_profile'); ?>
					</div>
				</td>
			</tr>
 -->
		</table>
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Добавить сообщество' : 'Сохранить изменения', array('class'=>'green_btn tac')); ?>
		<?php $this->endWidget(); ?>
	</div>
</div>